import React, { Component } from "react";
import { MsgContext } from "./context";
// import { MsgContext } from "./App";

export default class Son extends Component {
  static contextType = MsgContext;
  render() {
    return (
      <div>
        <h2>Son</h2>
        {/* context 是在对象挂载了接收value的值 */}
        {this.context}
      </div>
    );
  }
}
